﻿using DevTeam;
using System;
namespace ConfExpert.Forms.Siparisler
{
    public partial class YenidenEsle : XPopupForm
    {
        public int colVR, colLot, colQty, colWu, colWa;
        public YenidenEsle(int colVR, int colLot, int colQty, int colWu, int colWa)
        {
            InitializeComponent();
            txtVendorRollId.EditValue = colVR;
            txtLotNo.EditValue = colLot;
            txtQty.EditValue = colQty;
            txtWidthUsable.EditValue = colWu;
            txtWidthActual.EditValue = colWa;
        }

        private void YenidenEsle_Load(object sender, EventArgs e)
        {
            btnOK.ItemClick += BtnOK_ItemClick;
        }

        private void BtnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.colVR = txtVendorRollId.EditValue.ToInt(-1);
            this.colLot = txtLotNo.EditValue.ToInt(-1);
            this.colQty = txtQty.EditValue.ToInt(-1);
            this.colWu = txtWidthUsable.EditValue.ToInt(-1);
            this.colWa = txtWidthActual.EditValue.ToInt(-1);

            //if (colVR == 0 || colLot == 0 || colQty == 0 || colWu == 0 || colWa == 0)
            //    XtraMessageBox.Show("Bütün konumlar legal değerlerle doldurulmalı!");
            //else
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
    }
}
